package com.ddwl.goods.dao;

import com.ddwl.common.dao.TkDao;
import com.ddwl.goods.mapper.ItemRateMapper;
import com.ddwl.goods.model.ItemRate;
import com.ddwl.schema.bo.goods.ItemRatePageBo;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author hemiaojun
 * @Date 2021/7/1 16:26
 */

@Repository
public class ItemRateDao extends TkDao<ItemRateMapper,ItemRate> {

    @Resource
    private ItemRateMapper itemRateMapper;


    public List<ItemRate> list(ItemRatePageBo param) {
        Example example = getExample();
        example.and().andEqualTo("itemId", param.getItemId());
        return itemRateMapper.selectByExample(example);
    }
}